package com.carrot.uaa.web.controller;

import com.carrot.common.core.domain.R;
import com.carrot.uaa.app.TokenAppService;
import com.carrot.uaa.entity.dto.TokenDTO;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * token控制
 */
@RestController
@RequestMapping("/token/")
@AllArgsConstructor
public class TokenController {

    private final TokenAppService tokenAppService;

    @PostMapping("delOnLineTokenByUserId")
    private R delOnLineTokenByUserId(@RequestBody TokenDTO tokenDTO){
        return tokenAppService.delOnLineTokenByUserId(tokenDTO);
    }
}
